import request from '@/utils/request'

export function microorganismReadList(params) {
  return request({
    url: '/process/analyze/unscrambleList',
    method: 'get',
    params
  })
}
export function editMicroorganismRead(data) {
  return request({
    url: '/process/interpret',
    method: 'put',
    data
  })
}
// daoru
export function microorganismSubmitExcel(data) {
  return request({
    url: '/process/analyze/importData',
    method: 'post',
    data
  })
}
export function microorganismExportTemplate(params) {
  return request({
    url: '/process/analyze/exportTemplate',
    method: 'get',
    params
  })
}


// 质控报告
export function getQualityReport(params) {
  return request({
    url: '/process/analyze/getLabReportHtml',
    method: 'get',
    params
  })
}  
// 提交报告
export function addReport(data) {
  return request({
    url: '/process/analyze/addReport',
    method: 'post',
    data
  })
}
// 上传报告到lrp
export function submitReport(data) {
  return request({
    url: '/process/analyze/submitReport',
    method: 'post',
    data
  })
}
// 获取预览报告（test）
export function getReportPreview_test(params) {
  return request({
    url: '/process/analyze/getReportPreview',
    method: 'get',
    params
  })
}  
export function getReportPreview(data) {
  return request({
    url: '/process/analyze/generateReportPreview',
    method: 'post',
    data
  })
}  

// 查看报告
export function getAddReport(params) {
  return request({
    url: '/process/analyze/getAddReport',
    method: 'get',
    params
  })
}  

// 已确认初审
export function confirmAlreadyFirst(stateId) {
  return request({
    url: `/process/analyze/confirmAlreadyFirst/${stateId}`,
    method: 'post',
  })
}
// 初审
export function confirmFirst(stateId) {
  return request({
    url: `/process/analyze/confirmFirst/${stateId}`,
    method: 'post',
  })
}
// 复审
export function confirmReview(stateId) {
  return request({
    url: `/process/analyze/confirmReview/${stateId}`,
    method: 'post',
  })
}
// 删除初审
export function deleteFirst(stateId) {
  return request({
    url: `/process/analyze/deleteFirst/${stateId}`,
    method: 'post',
  })
}
// 删除复审
export function deleteReview(stateId) {
  return request({
    url: `/process/analyze/deleteReview/${stateId}`,
    method: 'post',
  })
}
// 获取基本信息
export function getBasicInfo(registerId) {
  return request({
    url: `/process/based/${registerId}`,
    method: 'get',
  })
}
// 比对
export function getCompareTable(data) {
  return request({
    url: '/process/analyze/getCompareTable',
    method: 'post',
    data
  })
} 
// 构图
export function getCompareImage(data) {
  return request({
    url: '/process/analyze/getCompareImage',
    method: 'post',
    data
  })
} 
// 日志
export function getProcessLog(params) {
  return request({
    url: '/process/analyze/getProcessLog',
    method: 'get',
    params
  })
} 
// 备注
export function getProcessRemark(params) {
  return request({
    url: '/process/analyze/getProcessRemark',
    method: 'get',
    params
  })
} 
// 获取各种表格
export function getTable(params) {
  return request({
    url: '/process/analyze/getTable',
    method: 'get',
    params
  })
} 
// 迟发申请列表
export function manageLateList(params) {
  return request({
    url: '/manage/manageLate/list',
    method: 'get',
    params
  })
} 
// 迟发申请新增
export function manageLate(data) {
  return request({
    url: '/manage/manageLate',
    method: 'post',
    data
  })
} 
// 迟发申请编辑/审核
export function manageLateEdit(data) {
  return request({
    url: '/manage/manageLate',
    method: 'put',
    data
  })
} 
// 迟发申请删除
export function manageLateDel(ids) {
  return request({
    url: '/manage/manageLate/'+ids,
    method: 'delete',
  })
} 
// 解读详细
export function unscrambleDetail(params) {
  return request({
    url: '/process/analyze/unscrambleDetail',
    method: 'get',
    params
  })
} 
// 添加备注
export function insertProcessLog(params) {
  return request({
    url: '/process/analyze/insertProcessLog',
    method: 'get',
    params
  })
} 
// 迟发查询用户列表
export function listUser(query) {
  return request({
    url: '/system/user/list',
    method: 'get',
    params: query
  })
}
// 迟发查询原因模板列表
export function reasonTemplate(query) {
  return request({
    url: '/dict/reason/list',
    method: 'get',
    params: query
  })
}
// 取消报告提交
export function cancelSubmitReport(data) {
  return request({
    url: '/process/analyze/cancelSubmitReport',
    method: 'post',
    data
  })
} 
// 保存
export function save(query) {
  return request({
    url: '/process/analyze/save',
    method: 'post',
    data: query
  })
}
// 申请单图片
export function getImageList(query) {
  return request({
    url: '/dict/sampleType/getImageList',
    method: 'get',
    params: query
  })
}
// 关联病例
export function relationList(query) {
  return request({
    url: '/process/analyze/associatedCasesList',
    method: 'get',
    params: query
  })
}